package com.neo.subscribe.stamp.service;

import com.alibaba.fastjson.JSON;
import com.neo.subscribe.stamp.dto.Stamp;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 处理邮票分页数据
 */
@Slf4j
@Service
public class StampPageDataResponseProcess extends AbstractResponseProcess{
    
    @Autowired
    private StampService stampService;
    
    @Override
    public int process(String responseText) {
        List<Stamp> stamps = processStampPageData(responseText);
        return stampService.saveStampList(stamps);
    }
}
